
def hold_retrieve_1():
  """ AilAg1 call to AilAg2,  AilAg2 hold, AilAg2 internal  call to AilAg3, rel. AilAg2, AilAg2 retrieve, rel. AilAg1"""
  AilAg1.MakeCall(DN2)
  AilAg2.AnswerCall()
  AilAg2.HoldCall()
  AilAg2.MakeCall(DN3)
  AilAg3.AnswerCall()
  AilAg2.ReleaseCall()
  AilAg2.RetrieveCall()
  AilAg1.ReleaseCall()

def hold_retrieve_2():
  """ Inbound call to AilAg1,  AilAg1 hold, AilAg1 internal  call to AilAg2, rel. AilAg1, AilAg1 retrieve, rel.ExtDn"""
  Ext1AilAg1.MakeCall(DN1)
  AilAg1.AnswerCall()
  AilAg1.HoldCall()
  AilAg1.MakeCall(DN2)
  AilAg2.AnswerCall()
  AilAg1.ReleaseCall()
  AilAg1.RetrieveCall()
  Ext1AilAg1.ReleaseCall()

def hold_retrieve_3():
  """ Outbound call AilAg1 to ExtDN,  AilAg1 hold, AilAg1 intern. call to AilAg2, rel. AilAg1, AilAg1 retrieve, rel.ExtDn"""
  AilAg1.MakeCall(Ext1DN2)
  Ext1AilAg2.AnswerCall()
  AilAg1.HoldCall()
  AilAg1.MakeCall(DN2)
  AilAg2.AnswerCall()
  AilAg1.ReleaseCall()
  AilAg1.RetrieveCall()
  Ext1AilAg2.ReleaseCall()

def hold_retrieve_4():
  """ AilAg1 call to AilAg2,  AilAg2 hold, AilAg2 outbound call , rel. AilAg2, AilAg2 retrieve, rel. AilAg1"""
  AilAg1.MakeCall(DN2)
  AilAg2.AnswerCall()
  AilAg2.HoldCall()
  AilAg2.MakeCall(Ext1DN2)
  Ext1AilAg2.AnswerCall()
  AilAg2.ReleaseCall()
  AilAg2.RetrieveCall()
  AilAg1.ReleaseCall()
  

def hold_retrieve_5():
  """ Inbound call to AilAg1,  AilAg1 hold, AilAg1 outbound  call,AilAg1 retrieve, rel.ExtDn"""
  Ext1AilAg1.MakeCall(DN1)
  AilAg1.AnswerCall()
  AilAg1.HoldCall()
  AilAg1.MakeCall(Ext1DN2)
  Ext1AilAg2.AnswerCall()
  AilAg1.ReleaseCall()
  AilAg1.RetrieveCall()
  Ext1AilAg1.ReleaseCall()

def hold_retrieve_6():
  """ AilAg1 call to AilAg2,  AilAg2 hold, AilAg2 unsuccesful intern. call to AilAg3, AilAg2 retrieve, rel. AilAg1"""
  AilAg1.MakeCall(DN2)
  AilAg2.AnswerCall()
  AilAg2.HoldCall()
  AilAg2.MakeCall(DN3)
  AilAg2.ReleaseCall()
  AilAg2.RetrieveCall()
  AilAg1.ReleaseCall()

def hold_retrieve_7():
  """ Inbound call to AilAg1,  AilAg1 hold,  AilAg1 unsuccesful intern. call to AilAg2, AilAg1 retrieve, rel.ExtDn"""
  Ext1AilAg1.MakeCall(DN1)
  AilAg1.AnswerCall()
  AilAg1.HoldCall()
  AilAg1.MakeCall(DN2)
  AilAg1.ReleaseCall()
  AilAg1.RetrieveCall()
  Ext1AilAg1.ReleaseCall()

def hold_retrieve_8():
  """ Outbound call AilAg1 to ExtDN,  AilAg1 hold, AilAg1 unsuccesful intern. call,AilAg1 retrieve, rel.ExtDn"""
  AilAg1.MakeCall(Ext1DN2)
  Ext1AilAg2.AnswerCall()
  AilAg1.HoldCall()
  AilAg1.MakeCall(DN2)
  AilAg1.ReleaseCall()
  AilAg1.RetrieveCall()
  Ext1AilAg2.ReleaseCall()

def hold_retrieve_9():
  """ AilAg1 call to AilAg2,  AilAg2 hold, AilAg2 unsuccesful outbound call, AilAg2 retrieve, rel. AilAg1"""
  AilAg1.MakeCall(DN2)
  AilAg2.AnswerCall()
  AilAg2.HoldCall()
  AilAg2.MakeCall(Ext1DN2)
  AilAg2.ReleaseCall()
  AilAg2.RetrieveCall()
  AilAg1.ReleaseCall()

def hold_retrieve_10():
  """ Inbound call to AilAg1,  AilAg1 hold,AilAg1 unsuccesful outbound call,AilAg1 retrieve, rel.ExtDn"""
  Ext1AilAg1.MakeCall(DN1)
  AilAg1.AnswerCall()
  AilAg1.HoldCall()
  AilAg1.MakeCall(Ext1DN2)
  AilAg1.ReleaseCall()
  AilAg1.RetrieveCall()
  Ext1AilAg1.ReleaseCall()

def hold_retrieve_11():
  """ AilAg1 call to ACD2, AilAg2 hold, AilAg2 internal call to AilAg3, rel. AilAg2, AilAg2 retrieve, rel. AilAg1"""
  AilAg1.MakeCall(ACD2)
  AilAg2.AnswerCall()
  AilAg2.HoldCall()
  AilAg2.MakeCall(DN3)
  AilAg3.AnswerCall()
  AilAg2.ReleaseCall()
  AilAg2.RetrieveCall()
  AilAg1.ReleaseCall()

def hold_retrieve_12():
  """ Inbound call to ACD2, AilAg2 hold, AilAg2 intern.  call to AilAg3, rel. AilAg2, AilAg2 retrieve, rel.ExtDn"""
  Ext1AilAg1.MakeCall(ACD2)
  AilAg2.AnswerCall()
  AilAg2.HoldCall()
  AilAg2.MakeCall(DN3)
  AilAg3.AnswerCall()
  AilAg2.ReleaseCall()
  AilAg2.RetrieveCall()
  Ext1AilAg1.ReleaseCall()

def hold_retrieve_13():
  """ AilAg1 call to ACD2, AilAg2 hold, AilAg2 outbound  call , rel. AilAg2, AilAg2 retrieve, rel. AilAg1"""
  AilAg1.MakeCall(ACD2)
  AilAg2.AnswerCall()
  AilAg2.HoldCall()
  AilAg2.MakeCall(Ext1DN2)
  Ext1AilAg2.AnswerCall()
  AilAg2.ReleaseCall()
  AilAg2.RetrieveCall()
  AilAg1.ReleaseCall()

def hold_retrieve_14():
  """Internal call, originator hold"""
  AilAg1.MakeCall(DN2)
  AilAg1.HoldCall()
  AilAg1.MakeCall(DN3)
  AilAg3.AnswerCall()
  AilAg2.AnswerCall()
  AilAg1.ReleaseCall()
  AilAg2.ReleaseCall()

  
def hold_retrieve_15():
  AilAg1.MakeCall(DN2)
  AilAg1.HoldCall()
  AilAg1.MakeCall(DN3)
  AilAg3.AnswerCall()
  AilAg1.ReleaseCall()
  AilAg2.AnswerCall()
  AilAg1.RetrieveCall()
  AilAg2.ReleaseCall()

def hold_retrieve_16():
  AilAg1.MakeCall(DN2)
  AilAg1.HoldCall()
  AilAg1.MakeCall(DN3)
  AilAg3.AnswerCall()
  AilAg1.ReleaseCall()
  AilAg1.RetrieveCall()
  AilAg2.AnswerCall()
  AilAg2.ReleaseCall()




